package com.guonima.controller;

import com.guonima.service.TestService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : guonima
 * @create : 2017-10-30-21:47
 */
@RestController
public class TestController {
    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private TestService testService;

    @GetMapping("/test")
    public String test(@RequestParam String name){
        logger.info("eureka-hystrix-ribbon has been call {}", name);

        return testService.test(name);
    }
}
